#include <iostream>
#include "TCPServer.h"

int main(int argc, char *argv[]) {
    if (argc != 3) {
        std::cout << "用法：" << argv[0] << " <IP地址> <端口号>\n";
        return -1;
    }

    const char *ip = argv[1];
    int port = std::stoi(argv[2]);

    TCPServer *server = new TCPServer(ip, port, std::thread::hardware_concurrency() + 1);
    server->start();

    delete server;
    return 0;
}